<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>三元运算符比较最大值</title>
</head>
<body>
    <script>
    let num1 = 88 ;
    let num2 = 66 ;
    let num3 = 28 ;
    //条件表达式
    //num1>num2的话，就num1 和num3去比
    //num1<num2的话，就num2 和num3去比
    let max =(num1 > num2 ? (num1 > num3 ? num1 : num3):(num2 > num3 ? num2 : num3));
    window.alert(max);
    console.log(max);
    </script>
</body>
</html>